//
// Copyright (c) 2011 Alex Nesterenko
//

#include "nane/RenderSystem/ogl/OGLAPI.h"
#include "nane/core/types.h"
#include "nane/core/log.h"

namespace nane
{
    ////////////////////////////////////////////////////////////////////////////////////////////////
    static const char* cOGLAPIVersionToString[] = { "Unknown"
                                                  , "1.0 ES Subset"
                                                  , "1.0"
                                                  , "1.1 ES Subset"
                                                  , "1.1"
                                                  , "1.2"
                                                  , "ES 1.0"
                                                  , "1.3"
                                                  , "1.4 ES Subset"
                                                  , "1.4"
                                                  , "ES 1.1"
                                                  , "1.5"
                                                  , "2.0"
                                                  , "2.1" };
    ////////////////////////////////////////////////////////////////////////////////////////////////
    EOGLAPIVersion               OGLAPI::version = GLAPI_UNKNOWN;
    ModuleHandle*                OGLAPI::hModule = NULL;
    PFNGLCLEARINDEX              OGLAPI::glClearIndex = NULL;
    PFNGLCLEARCOLOR              OGLAPI::glClearColor = NULL;
    PFNGLCLEAR                   OGLAPI::glClear = NULL;
    PFNGLINDEXMASK               OGLAPI::glIndexMask = NULL;
    PFNGLCOLORMASK               OGLAPI::glColorMask = NULL;
    PFNGLALPHAFUNC               OGLAPI::glAlphaFunc = NULL;
    PFNGLBLENDFUNC               OGLAPI::glBlendFunc = NULL;
    PFNGLLOGICOP                 OGLAPI::glLogicOp = NULL;
    PFNGLCULLFACE                OGLAPI::glCullFace = NULL;
    PFNGLFRONTFACE               OGLAPI::glFrontFace = NULL;
    PFNGLPOINTSIZE               OGLAPI::glPointSize = NULL;
    PFNGLLINEWIDTH               OGLAPI::glLineWidth = NULL;
    PFNGLLINESTIPPLE             OGLAPI::glLineStipple = NULL;
    PFNGLPOLYGONMODE             OGLAPI::glPolygonMode = NULL;
    PFNGLPOLYGONOFFSET           OGLAPI::glPolygonOffset = NULL;
    PFNGLPOLYGONSTIPPLE          OGLAPI::glPolygonStipple = NULL;
    PFNGLGETPOLYGONSTIPPLE       OGLAPI::glGetPolygonStipple = NULL;
    PFNGLEDGEFLAG                OGLAPI::glEdgeFlag = NULL;
    PFNGLEDGEFLAGV               OGLAPI::glEdgeFlagv = NULL;
    PFNGLSCISSOR                 OGLAPI::glScissor = NULL;
    PFNGLCLIPPLANE               OGLAPI::glClipPlane = NULL;
    PFNGLGETCLIPPLANE            OGLAPI::glGetClipPlane = NULL;
    PFNGLDRAWBUFFER              OGLAPI::glDrawBuffer = NULL;
    PFNGLREADBUFFER              OGLAPI::glReadBuffer = NULL;
    PFNGLENABLE                  OGLAPI::glEnable = NULL;
    PFNGLDISABLE                 OGLAPI::glDisable = NULL;
    PFNGLISENABLED               OGLAPI::glIsEnabled = NULL;
    PFNGLENABLECLIENTSTATE       OGLAPI::glEnableClientState = NULL;
    PFNGLDISABLECLIENTSTATE      OGLAPI::glDisableClientState = NULL;
    PFNGLGETBOOLEANV             OGLAPI::glGetBooleanv = NULL;
    PFNGLGETDOUBLEV              OGLAPI::glGetDoublev = NULL;
    PFNGLGETFLOATV               OGLAPI::glGetFloatv = NULL;
    PFNGLGETINTEGERV             OGLAPI::glGetIntegerv = NULL;
    PFNGLPUSHATTRIB              OGLAPI::glPushAttrib = NULL;
    PFNGLPOPATTRIB               OGLAPI::glPopAttrib = NULL;
    PFNGLPUSHCLIENTATTRIB        OGLAPI::glPushClientAttrib = NULL;
    PFNGLPOPCLIENTATTRIB         OGLAPI::glPopClientAttrib = NULL;
    PFNGLRENDERMODE              OGLAPI::glRenderMode = NULL;
    PFNGLGETERROR                OGLAPI::glGetError = NULL;
    PFNGLGETSTRING               OGLAPI::glGetString = NULL;
    PFNGLFINISH                  OGLAPI::glFinish = NULL;
    PFNGLFLUSH                   OGLAPI::glFlush = NULL;
    PFNGLHINT                    OGLAPI::glHint = NULL;
    PFNGLCLEARDEPTH              OGLAPI::glClearDepth = NULL;
    PFNGLDEPTHFUNC               OGLAPI::glDepthFunc = NULL;
    PFNGLDEPTHMASK               OGLAPI::glDepthMask = NULL;
    PFNGLDEPTHRANGE              OGLAPI::glDepthRange = NULL;
    PFNGLCLEARACCUM              OGLAPI::glClearAccum = NULL;
    PFNGLACCUM                   OGLAPI::glAccum = NULL;
    PFNGLMATRIXMODE              OGLAPI::glMatrixMode = NULL;
    PFNGLORTHO                   OGLAPI::glOrtho = NULL;
    PFNGLFRUSTUM                 OGLAPI::glFrustum = NULL;
    PFNGLVIEWPORT                OGLAPI::glViewport = NULL;
    PFNGLPUSHMATRIX              OGLAPI::glPushMatrix = NULL;
    PFNGLPOPMATRIX               OGLAPI::glPopMatrix = NULL;
    PFNGLLOADIDENTITY            OGLAPI::glLoadIdentity = NULL;
    PFNGLLOADMATRIXD             OGLAPI::glLoadMatrixd = NULL;
    PFNGLLOADMATRIXF             OGLAPI::glLoadMatrixf = NULL;
    PFNGLMULTMATRIXD             OGLAPI::glMultMatrixd = NULL;
    PFNGLMULTMATRIXF             OGLAPI::glMultMatrixf = NULL;
    PFNGLROTATED                 OGLAPI::glRotated = NULL;
    PFNGLROTATEF                 OGLAPI::glRotatef = NULL;
    PFNGLSCALED                  OGLAPI::glScaled = NULL;
    PFNGLSCALEF                  OGLAPI::glScalef = NULL;
    PFNGLTRANSLATED              OGLAPI::glTranslated = NULL;
    PFNGLTRANSLATEF              OGLAPI::glTranslatef = NULL;
    PFNGLISLIST                  OGLAPI::glIsList = NULL;
    PFNGLDELETELISTS             OGLAPI::glDeleteLists = NULL;
    PFNGLGENLISTS                OGLAPI::glGenLists = NULL;
    PFNGLNEWLIST                 OGLAPI::glNewList = NULL;
    PFNGLENDLIST                 OGLAPI::glEndList = NULL;
    PFNGLCALLLIST                OGLAPI::glCallList = NULL;
    PFNGLCALLLISTS               OGLAPI::glCallLists = NULL;
    PFNGLLISTBASE                OGLAPI::glListBase = NULL;
    PFNGLBEGIN                   OGLAPI::glBegin = NULL;
    PFNGLEND                     OGLAPI::glEnd = NULL;
    PFNGLVERTEX2D                OGLAPI::glVertex2d = NULL;
    PFNGLVERTEX2F                OGLAPI::glVertex2f = NULL;
    PFNGLVERTEX2I                OGLAPI::glVertex2i = NULL;
    PFNGLVERTEX2S                OGLAPI::glVertex2s = NULL;
    PFNGLVERTEX3D                OGLAPI::glVertex3d = NULL;
    PFNGLVERTEX3F                OGLAPI::glVertex3f = NULL;
    PFNGLVERTEX3I                OGLAPI::glVertex3i = NULL;
    PFNGLVERTEX3S                OGLAPI::glVertex3s = NULL;
    PFNGLVERTEX4D                OGLAPI::glVertex4d = NULL;
    PFNGLVERTEX4F                OGLAPI::glVertex4f = NULL;
    PFNGLVERTEX4I                OGLAPI::glVertex4i = NULL;
    PFNGLVERTEX4S                OGLAPI::glVertex4s = NULL;
    PFNGLVERTEX2DV               OGLAPI::glVertex2dv = NULL;
    PFNGLVERTEX2FV               OGLAPI::glVertex2fv = NULL;
    PFNGLVERTEX2IV               OGLAPI::glVertex2iv = NULL;
    PFNGLVERTEX2SV               OGLAPI::glVertex2sv = NULL;
    PFNGLVERTEX3DV               OGLAPI::glVertex3dv = NULL;
    PFNGLVERTEX3FV               OGLAPI::glVertex3fv = NULL;
    PFNGLVERTEX3IV               OGLAPI::glVertex3iv = NULL;
    PFNGLVERTEX3SV               OGLAPI::glVertex3sv = NULL;
    PFNGLVERTEX4DV               OGLAPI::glVertex4dv = NULL;
    PFNGLVERTEX4FV               OGLAPI::glVertex4fv = NULL;
    PFNGLVERTEX4IV               OGLAPI::glVertex4iv = NULL;
    PFNGLVERTEX4SV               OGLAPI::glVertex4sv = NULL;
    PFNGLNORMAL3B                OGLAPI::glNormal3b = NULL;
    PFNGLNORMAL3D                OGLAPI::glNormal3d = NULL;
    PFNGLNORMAL3F                OGLAPI::glNormal3f = NULL;
    PFNGLNORMAL3I                OGLAPI::glNormal3i = NULL;
    PFNGLNORMAL3S                OGLAPI::glNormal3s = NULL;
    PFNGLNORMAL3BV               OGLAPI::glNormal3bv = NULL;
    PFNGLNORMAL3DV               OGLAPI::glNormal3dv = NULL;
    PFNGLNORMAL3FV               OGLAPI::glNormal3fv = NULL;
    PFNGLNORMAL3IV               OGLAPI::glNormal3iv = NULL;
    PFNGLNORMAL3SV               OGLAPI::glNormal3sv = NULL;
    PFNGLINDEXD                  OGLAPI::glIndexd = NULL;
    PFNGLINDEXF                  OGLAPI::glIndexf = NULL;
    PFNGLINDEXI                  OGLAPI::glIndexi = NULL;
    PFNGLINDEXS                  OGLAPI::glIndexs = NULL;
    PFNGLINDEXUB                 OGLAPI::glIndexub = NULL;
    PFNGLINDEXDV                 OGLAPI::glIndexdv = NULL;
    PFNGLINDEXFV                 OGLAPI::glIndexfv = NULL;
    PFNGLINDEXIV                 OGLAPI::glIndexiv = NULL;
    PFNGLINDEXSV                 OGLAPI::glIndexsv = NULL;
    PFNGLINDEXUBV                OGLAPI::glIndexubv = NULL;
    PFNGLCOLOR3B                 OGLAPI::glColor3b = NULL;
    PFNGLCOLOR3D                 OGLAPI::glColor3d = NULL;
    PFNGLCOLOR3F                 OGLAPI::glColor3f = NULL;
    PFNGLCOLOR3I                 OGLAPI::glColor3i = NULL;
    PFNGLCOLOR3S                 OGLAPI::glColor3s = NULL;
    PFNGLCOLOR3UB                OGLAPI::glColor3ub = NULL;
    PFNGLCOLOR3UI                OGLAPI::glColor3ui = NULL;
    PFNGLCOLOR3US                OGLAPI::glColor3us = NULL;
    PFNGLCOLOR4B                 OGLAPI::glColor4b = NULL;
    PFNGLCOLOR4D                 OGLAPI::glColor4d = NULL;
    PFNGLCOLOR4F                 OGLAPI::glColor4f = NULL;
    PFNGLCOLOR4I                 OGLAPI::glColor4i = NULL;
    PFNGLCOLOR4S                 OGLAPI::glColor4s = NULL;
    PFNGLCOLOR4UB                OGLAPI::glColor4ub = NULL;
    PFNGLCOLOR4UI                OGLAPI::glColor4ui = NULL;
    PFNGLCOLOR4US                OGLAPI::glColor4us = NULL;
    PFNGLCOLOR3BV                OGLAPI::glColor3bv = NULL;
    PFNGLCOLOR3DV                OGLAPI::glColor3dv = NULL;
    PFNGLCOLOR3FV                OGLAPI::glColor3fv = NULL;
    PFNGLCOLOR3IV                OGLAPI::glColor3iv = NULL;
    PFNGLCOLOR3SV                OGLAPI::glColor3sv = NULL;
    PFNGLCOLOR3UBV               OGLAPI::glColor3ubv = NULL;
    PFNGLCOLOR3UIV               OGLAPI::glColor3uiv = NULL;
    PFNGLCOLOR3USV               OGLAPI::glColor3usv = NULL;
    PFNGLCOLOR4BV                OGLAPI::glColor4bv = NULL;
    PFNGLCOLOR4DV                OGLAPI::glColor4dv = NULL;
    PFNGLCOLOR4FV                OGLAPI::glColor4fv = NULL;
    PFNGLCOLOR4IV                OGLAPI::glColor4iv = NULL;
    PFNGLCOLOR4SV                OGLAPI::glColor4sv = NULL;
    PFNGLCOLOR4UBV               OGLAPI::glColor4ubv = NULL;
    PFNGLCOLOR4UIV               OGLAPI::glColor4uiv = NULL;
    PFNGLCOLOR4USV               OGLAPI::glColor4usv = NULL;
    PFNGLTEXCOORD1D              OGLAPI::glTexCoord1d = NULL;
    PFNGLTEXCOORD1F              OGLAPI::glTexCoord1f = NULL;
    PFNGLTEXCOORD1I              OGLAPI::glTexCoord1i = NULL;
    PFNGLTEXCOORD1S              OGLAPI::glTexCoord1s = NULL;
    PFNGLTEXCOORD2D              OGLAPI::glTexCoord2d = NULL;
    PFNGLTEXCOORD2F              OGLAPI::glTexCoord2f = NULL;
    PFNGLTEXCOORD2I              OGLAPI::glTexCoord2i = NULL;
    PFNGLTEXCOORD2S              OGLAPI::glTexCoord2s = NULL;
    PFNGLTEXCOORD3D              OGLAPI::glTexCoord3d = NULL;
    PFNGLTEXCOORD3F              OGLAPI::glTexCoord3f = NULL;
    PFNGLTEXCOORD3I              OGLAPI::glTexCoord3i = NULL;
    PFNGLTEXCOORD3S              OGLAPI::glTexCoord3s = NULL;
    PFNGLTEXCOORD4D              OGLAPI::glTexCoord4d = NULL;
    PFNGLTEXCOORD4F              OGLAPI::glTexCoord4f = NULL;
    PFNGLTEXCOORD4I              OGLAPI::glTexCoord4i = NULL;
    PFNGLTEXCOORD4S              OGLAPI::glTexCoord4s = NULL;
    PFNGLTEXCOORD1DV             OGLAPI::glTexCoord1dv = NULL;
    PFNGLTEXCOORD1FV             OGLAPI::glTexCoord1fv = NULL;
    PFNGLTEXCOORD1IV             OGLAPI::glTexCoord1iv = NULL;
    PFNGLTEXCOORD1SV             OGLAPI::glTexCoord1sv = NULL;
    PFNGLTEXCOORD2DV             OGLAPI::glTexCoord2dv = NULL;
    PFNGLTEXCOORD2FV             OGLAPI::glTexCoord2fv = NULL;
    PFNGLTEXCOORD2IV             OGLAPI::glTexCoord2iv = NULL;
    PFNGLTEXCOORD2SV             OGLAPI::glTexCoord2sv = NULL;
    PFNGLTEXCOORD3DV             OGLAPI::glTexCoord3dv = NULL;
    PFNGLTEXCOORD3FV             OGLAPI::glTexCoord3fv = NULL;
    PFNGLTEXCOORD3IV             OGLAPI::glTexCoord3iv = NULL;
    PFNGLTEXCOORD3SV             OGLAPI::glTexCoord3sv = NULL;
    PFNGLTEXCOORD4DV             OGLAPI::glTexCoord4dv = NULL;
    PFNGLTEXCOORD4FV             OGLAPI::glTexCoord4fv = NULL;
    PFNGLTEXCOORD4IV             OGLAPI::glTexCoord4iv = NULL;
    PFNGLTEXCOORD4SV             OGLAPI::glTexCoord4sv = NULL;
    PFNGLRASTERPOS2D             OGLAPI::glRasterPos2d = NULL;
    PFNGLRASTERPOS2F             OGLAPI::glRasterPos2f = NULL;
    PFNGLRASTERPOS2I             OGLAPI::glRasterPos2i = NULL;
    PFNGLRASTERPOS2S             OGLAPI::glRasterPos2s = NULL;
    PFNGLRASTERPOS3D             OGLAPI::glRasterPos3d = NULL;
    PFNGLRASTERPOS3F             OGLAPI::glRasterPos3f = NULL;
    PFNGLRASTERPOS3I             OGLAPI::glRasterPos3i = NULL;
    PFNGLRASTERPOS3S             OGLAPI::glRasterPos3s = NULL;
    PFNGLRASTERPOS4D             OGLAPI::glRasterPos4d = NULL;
    PFNGLRASTERPOS4F             OGLAPI::glRasterPos4f = NULL;
    PFNGLRASTERPOS4I             OGLAPI::glRasterPos4i = NULL;
    PFNGLRASTERPOS4S             OGLAPI::glRasterPos4s = NULL;
    PFNGLRASTERPOS2DV            OGLAPI::glRasterPos2dv = NULL;
    PFNGLRASTERPOS2FV            OGLAPI::glRasterPos2fv = NULL;
    PFNGLRASTERPOS2IV            OGLAPI::glRasterPos2iv = NULL;
    PFNGLRASTERPOS2SV            OGLAPI::glRasterPos2sv = NULL;
    PFNGLRASTERPOS3DV            OGLAPI::glRasterPos3dv = NULL;
    PFNGLRASTERPOS3FV            OGLAPI::glRasterPos3fv = NULL;
    PFNGLRASTERPOS3IV            OGLAPI::glRasterPos3iv = NULL;
    PFNGLRASTERPOS3SV            OGLAPI::glRasterPos3sv = NULL;
    PFNGLRASTERPOS4DV            OGLAPI::glRasterPos4dv = NULL;
    PFNGLRASTERPOS4FV            OGLAPI::glRasterPos4fv = NULL;
    PFNGLRASTERPOS4IV            OGLAPI::glRasterPos4iv = NULL;
    PFNGLRASTERPOS4SV            OGLAPI::glRasterPos4sv = NULL;
    PFNGLRECTD                   OGLAPI::glRectd = NULL;
    PFNGLRECTF                   OGLAPI::glRectf = NULL;
    PFNGLRECTI                   OGLAPI::glRecti = NULL;
    PFNGLRECTS                   OGLAPI::glRects = NULL;
    PFNGLRECTDV                  OGLAPI::glRectdv = NULL;
    PFNGLRECTFV                  OGLAPI::glRectfv = NULL;
    PFNGLRECTIV                  OGLAPI::glRectiv = NULL;
    PFNGLRECTSV                  OGLAPI::glRectsv = NULL;
    PFNGLSHADEMODEL              OGLAPI::glShadeModel = NULL;
    PFNGLLIGHTF                  OGLAPI::glLightf = NULL;
    PFNGLLIGHTI                  OGLAPI::glLighti = NULL;
    PFNGLLIGHTFV                 OGLAPI::glLightfv = NULL;
    PFNGLLIGHTIV                 OGLAPI::glLightiv = NULL;
    PFNGLGETLIGHTFV              OGLAPI::glGetLightfv = NULL;
    PFNGLGETLIGHTIV              OGLAPI::glGetLightiv = NULL;
    PFNGLLIGHTMODELF             OGLAPI::glLightModelf = NULL;
    PFNGLLIGHTMODELI             OGLAPI::glLightModeli = NULL;
    PFNGLLIGHTMODELFV            OGLAPI::glLightModelfv = NULL;
    PFNGLLIGHTMODELIV            OGLAPI::glLightModeliv = NULL;
    PFNGLMATERIALF               OGLAPI::glMaterialf = NULL;
    PFNGLMATERIALI               OGLAPI::glMateriali = NULL;
    PFNGLMATERIALFV              OGLAPI::glMaterialfv = NULL;
    PFNGLMATERIALIV              OGLAPI::glMaterialiv = NULL;
    PFNGLGETMATERIALFV           OGLAPI::glGetMaterialfv = NULL;
    PFNGLGETMATERIALIV           OGLAPI::glGetMaterialiv = NULL;
    PFNGLCOLORMATERIAL           OGLAPI::glColorMaterial = NULL;
    PFNGLPIXELZOOM               OGLAPI::glPixelZoom = NULL;
    PFNGLPIXELSTOREF             OGLAPI::glPixelStoref = NULL;
    PFNGLPIXELSTOREI             OGLAPI::glPixelStorei = NULL;
    PFNGLPIXELTRANSFERF          OGLAPI::glPixelTransferf = NULL;
    PFNGLPIXELTRANSFERI          OGLAPI::glPixelTransferi = NULL;
    PFNGLPIXELMAPFV              OGLAPI::glPixelMapfv = NULL;
    PFNGLPIXELMAPUIV             OGLAPI::glPixelMapuiv = NULL;
    PFNGLPIXELMAPUSV             OGLAPI::glPixelMapusv = NULL;
    PFNGLGETPIXELMAPFV           OGLAPI::glGetPixelMapfv = NULL;
    PFNGLGETPIXELMAPUIV          OGLAPI::glGetPixelMapuiv = NULL;
    PFNGLGETPIXELMAPUSV          OGLAPI::glGetPixelMapusv = NULL;
    PFNGLBITMAP                  OGLAPI::glBitmap = NULL;
    PFNGLREADPIXELS              OGLAPI::glReadPixels = NULL;
    PFNGLDRAWPIXELS              OGLAPI::glDrawPixels = NULL;
    PFNGLCOPYPIXELS              OGLAPI::glCopyPixels = NULL;
    PFNGLSTENCILFUNC             OGLAPI::glStencilFunc = NULL;
    PFNGLSTENCILMASK             OGLAPI::glStencilMask = NULL;
    PFNGLSTENCILOP               OGLAPI::glStencilOp = NULL;
    PFNGLCLEARSTENCIL            OGLAPI::glClearStencil = NULL;
    PFNGLTEXGEND                 OGLAPI::glTexGend = NULL;
    PFNGLTEXGENF                 OGLAPI::glTexGenf = NULL;
    PFNGLTEXGENI                 OGLAPI::glTexGeni = NULL;
    PFNGLTEXGENDV                OGLAPI::glTexGendv = NULL;
    PFNGLTEXGENFV                OGLAPI::glTexGenfv = NULL;
    PFNGLTEXGENIV                OGLAPI::glTexGeniv = NULL;
    PFNGLGETTEXGENDV             OGLAPI::glGetTexGendv = NULL;
    PFNGLGETTEXGENFV             OGLAPI::glGetTexGenfv = NULL;
    PFNGLGETTEXGENIV             OGLAPI::glGetTexGeniv = NULL;
    PFNGLTEXENVF                 OGLAPI::glTexEnvf = NULL;
    PFNGLTEXENVI                 OGLAPI::glTexEnvi = NULL;
    PFNGLTEXENVFV                OGLAPI::glTexEnvfv = NULL;
    PFNGLTEXENVIV                OGLAPI::glTexEnviv = NULL;
    PFNGLGETTEXENVFV             OGLAPI::glGetTexEnvfv = NULL;
    PFNGLGETTEXENVIV             OGLAPI::glGetTexEnviv = NULL;
    PFNGLTEXPARAMETERF           OGLAPI::glTexParameterf = NULL;
    PFNGLTEXPARAMETERI           OGLAPI::glTexParameteri = NULL;
    PFNGLTEXPARAMETERFV          OGLAPI::glTexParameterfv = NULL;
    PFNGLTEXPARAMETERIV          OGLAPI::glTexParameteriv = NULL;
    PFNGLGETTEXPARAMETERFV       OGLAPI::glGetTexParameterfv = NULL;
    PFNGLGETTEXPARAMETERIV       OGLAPI::glGetTexParameteriv = NULL;
    PFNGLGETTEXLEVELPARAMETERFV  OGLAPI::glGetTexLevelParameterfv = NULL;
    PFNGLGETTEXLEVELPARAMETERIV  OGLAPI::glGetTexLevelParameteriv = NULL;
    PFNGLTEXIMAGE1D              OGLAPI::glTexImage1D = NULL;
    PFNGLTEXIMAGE2D              OGLAPI::glTexImage2D = NULL;
    PFNGLGETTEXIMAGE             OGLAPI::glGetTexImage = NULL;
    PFNGLMAP1D                   OGLAPI::glMap1d = NULL;
    PFNGLMAP1F                   OGLAPI::glMap1f = NULL;
    PFNGLMAP2D                   OGLAPI::glMap2d = NULL;
    PFNGLMAP2F                   OGLAPI::glMap2f = NULL;
    PFNGLGETMAPDV                OGLAPI::glGetMapdv = NULL;
    PFNGLGETMAPFV                OGLAPI::glGetMapfv = NULL;
    PFNGLGETMAPIV                OGLAPI::glGetMapiv = NULL;
    PFNGLEVALCOORD1D             OGLAPI::glEvalCoord1d = NULL;
    PFNGLEVALCOORD1F             OGLAPI::glEvalCoord1f = NULL;
    PFNGLEVALCOORD1DV            OGLAPI::glEvalCoord1dv = NULL;
    PFNGLEVALCOORD1FV            OGLAPI::glEvalCoord1fv = NULL;
    PFNGLEVALCOORD2D             OGLAPI::glEvalCoord2d = NULL;
    PFNGLEVALCOORD2F             OGLAPI::glEvalCoord2f = NULL;
    PFNGLEVALCOORD2DV            OGLAPI::glEvalCoord2dv = NULL;
    PFNGLEVALCOORD2FV            OGLAPI::glEvalCoord2fv = NULL;
    PFNGLMAPGRID1D               OGLAPI::glMapGrid1d = NULL;
    PFNGLMAPGRID1F               OGLAPI::glMapGrid1f = NULL;
    PFNGLMAPGRID2D               OGLAPI::glMapGrid2d = NULL;
    PFNGLMAPGRID2F               OGLAPI::glMapGrid2f = NULL;
    PFNGLEVALPOINT1              OGLAPI::glEvalPoint1 = NULL;
    PFNGLEVALPOINT2              OGLAPI::glEvalPoint2 = NULL;
    PFNGLEVALMESH1               OGLAPI::glEvalMesh1 = NULL;
    PFNGLEVALMESH2               OGLAPI::glEvalMesh2 = NULL;
    PFNGLFOGF                    OGLAPI::glFogf = NULL;
    PFNGLFOGI                    OGLAPI::glFogi = NULL;
    PFNGLFOGFV                   OGLAPI::glFogfv = NULL;
    PFNGLFOGIV                   OGLAPI::glFogiv = NULL;
    PFNGLFEEDBACKBUFFER          OGLAPI::glFeedbackBuffer = NULL;
    PFNGLPASSTHROUGH             OGLAPI::glPassThrough = NULL;
    PFNGLSELECTBUFFER            OGLAPI::glSelectBuffer = NULL;
    PFNGLINITNAMES               OGLAPI::glInitNames = NULL;
    PFNGLLOADNAME                OGLAPI::glLoadName = NULL;
    PFNGLPUSHNAME                OGLAPI::glPushName = NULL;
    PFNGLPOPNAME                 OGLAPI::glPopName = NULL;
    PFNGLGENTEXTURES             OGLAPI::glGenTextures = NULL;
    PFNGLDELETETEXTURES          OGLAPI::glDeleteTextures = NULL;
    PFNGLBINDTEXTURE             OGLAPI::glBindTexture = NULL;
    PFNGLPRIORITIZETEXTURES      OGLAPI::glPrioritizeTextures = NULL;
    PFNGLARETEXTURESRESIDENT     OGLAPI::glAreTexturesResident = NULL;
    PFNGLISTEXTURE               OGLAPI::glIsTexture = NULL;
    PFNGLTEXSUBIMAGE1D           OGLAPI::glTexSubImage1D = NULL;
    PFNGLTEXSUBIMAGE2D           OGLAPI::glTexSubImage2D = NULL;
    PFNGLCOPYTEXIMAGE1D          OGLAPI::glCopyTexImage1D = NULL;
    PFNGLCOPYTEXIMAGE2D          OGLAPI::glCopyTexImage2D = NULL;
    PFNGLCOPYTEXSUBIMAGE1D       OGLAPI::glCopyTexSubImage1D = NULL;
    PFNGLCOPYTEXSUBIMAGE2D       OGLAPI::glCopyTexSubImage2D = NULL;
    PFNGLVERTEXPOINTER           OGLAPI::glVertexPointer = NULL;
    PFNGLNORMALPOINTER           OGLAPI::glNormalPointer = NULL;
    PFNGLCOLORPOINTER            OGLAPI::glColorPointer = NULL;
    PFNGLINDEXPOINTER            OGLAPI::glIndexPointer = NULL;
    PFNGLTEXCOORDPOINTER         OGLAPI::glTexCoordPointer = NULL;
    PFNGLEDGEFLAGPOINTER         OGLAPI::glEdgeFlagPointer = NULL;
    PFNGLGETPOINTERV             OGLAPI::glGetPointerv = NULL;
    PFNGLARRAYELEMENT            OGLAPI::glArrayElement = NULL;
    PFNGLDRAWARRAYS              OGLAPI::glDrawArrays = NULL;
    PFNGLDRAWELEMENTS            OGLAPI::glDrawElements = NULL;
    PFNGLINTERLEAVEDARRAYS       OGLAPI::glInterleavedArrays = NULL;
    PFNGLBLENDCOLORPROC          OGLAPI::glBlendColor = NULL;
    PFNGLBLENDEQUATIONPROC       OGLAPI::glBlendEquation = NULL;
    PFNGLDRAWRANGEELEMENTSPROC   OGLAPI::glDrawRangeElements = NULL;
    PFNGLCOLORTABLEPROC          OGLAPI::glColorTable = NULL;
    PFNGLCOLORTABLEPARAMETERFVPROC OGLAPI::glColorTableParameterfv = NULL;
    PFNGLCOLORTABLEPARAMETERIVPROC OGLAPI::glColorTableParameteriv = NULL;
    PFNGLCOPYCOLORTABLEPROC      OGLAPI::glCopyColorTable = NULL;
    PFNGLGETCOLORTABLEPROC       OGLAPI::glGetColorTable = NULL;
    PFNGLGETCOLORTABLEPARAMETERFVPROC OGLAPI::glGetColorTableParameterfv = NULL;
    PFNGLGETCOLORTABLEPARAMETERIVPROC OGLAPI::glGetColorTableParameteriv = NULL;
    PFNGLCOLORSUBTABLEPROC       OGLAPI::glColorSubTable = NULL;
    PFNGLCOPYCOLORSUBTABLEPROC   OGLAPI::glCopyColorSubTable = NULL;
    PFNGLCONVOLUTIONFILTER1DPROC OGLAPI::glConvolutionFilter1D = NULL;
    PFNGLCONVOLUTIONFILTER2DPROC OGLAPI::glConvolutionFilter2D = NULL;
    PFNGLCONVOLUTIONPARAMETERFPROC OGLAPI::glConvolutionParameterf = NULL;
    PFNGLCONVOLUTIONPARAMETERFVPROC OGLAPI::glConvolutionParameterfv = NULL;
    PFNGLCONVOLUTIONPARAMETERIPROC OGLAPI::glConvolutionParameteri = NULL;
    PFNGLCONVOLUTIONPARAMETERIVPROC OGLAPI::glConvolutionParameteriv = NULL;
    PFNGLCOPYCONVOLUTIONFILTER1DPROC OGLAPI::glCopyConvolutionFilter1D = NULL;
    PFNGLCOPYCONVOLUTIONFILTER2DPROC OGLAPI::glCopyConvolutionFilter2D = NULL;
    PFNGLGETCONVOLUTIONFILTERPROC OGLAPI::glGetConvolutionFilter = NULL;
    PFNGLGETCONVOLUTIONPARAMETERFVPROC OGLAPI::glGetConvolutionParameterfv = NULL;
    PFNGLGETCONVOLUTIONPARAMETERIVPROC OGLAPI::glGetConvolutionParameteriv = NULL;
    PFNGLGETSEPARABLEFILTERPROC  OGLAPI::glGetSeparableFilter = NULL;
    PFNGLSEPARABLEFILTER2DPROC   OGLAPI::glSeparableFilter2D = NULL;
    PFNGLGETHISTOGRAMPROC        OGLAPI::glGetHistogram = NULL;
    PFNGLGETHISTOGRAMPARAMETERFVPROC OGLAPI::glGetHistogramParameterfv = NULL;
    PFNGLGETHISTOGRAMPARAMETERIVPROC OGLAPI::glGetHistogramParameteriv = NULL;
    PFNGLGETMINMAXPROC           OGLAPI::glGetMinmax = NULL;
    PFNGLGETMINMAXPARAMETERFVPROC OGLAPI::glGetMinmaxParameterfv = NULL;
    PFNGLGETMINMAXPARAMETERIVPROC OGLAPI::glGetMinmaxParameteriv = NULL;
    PFNGLHISTOGRAMPROC           OGLAPI::glHistogram = NULL;
    PFNGLMINMAXPROC              OGLAPI::glMinmax = NULL;
    PFNGLRESETHISTOGRAMPROC      OGLAPI::glResetHistogram = NULL;
    PFNGLRESETMINMAXPROC         OGLAPI::glResetMinmax = NULL;
    PFNGLTEXIMAGE3DPROC          OGLAPI::glTexImage3D = NULL;
    PFNGLTEXSUBIMAGE3DPROC       OGLAPI::glTexSubImage3D = NULL;
    PFNGLCOPYTEXSUBIMAGE3DPROC   OGLAPI::glCopyTexSubImage3D = NULL;
    PFNGLACTIVETEXTUREPROC       OGLAPI::glActiveTexture = NULL;
    PFNGLCLIENTACTIVETEXTUREPROC OGLAPI::glClientActiveTexture = NULL;
    PFNGLMULTITEXCOORD1DPROC     OGLAPI::glMultiTexCoord1d = NULL;
    PFNGLMULTITEXCOORD1DVPROC    OGLAPI::glMultiTexCoord1dv = NULL;
    PFNGLMULTITEXCOORD1FPROC     OGLAPI::glMultiTexCoord1f = NULL;
    PFNGLMULTITEXCOORD1FVPROC    OGLAPI::glMultiTexCoord1fv = NULL;
    PFNGLMULTITEXCOORD1IPROC     OGLAPI::glMultiTexCoord1i = NULL;
    PFNGLMULTITEXCOORD1IVPROC    OGLAPI::glMultiTexCoord1iv = NULL;
    PFNGLMULTITEXCOORD1SPROC     OGLAPI::glMultiTexCoord1s = NULL;
    PFNGLMULTITEXCOORD1SVPROC    OGLAPI::glMultiTexCoord1sv = NULL;
    PFNGLMULTITEXCOORD2DPROC     OGLAPI::glMultiTexCoord2d = NULL;
    PFNGLMULTITEXCOORD2DVPROC    OGLAPI::glMultiTexCoord2dv = NULL;
    PFNGLMULTITEXCOORD2FPROC     OGLAPI::glMultiTexCoord2f = NULL;
    PFNGLMULTITEXCOORD2FVPROC    OGLAPI::glMultiTexCoord2fv = NULL;
    PFNGLMULTITEXCOORD2IPROC     OGLAPI::glMultiTexCoord2i = NULL;
    PFNGLMULTITEXCOORD2IVPROC    OGLAPI::glMultiTexCoord2iv = NULL;
    PFNGLMULTITEXCOORD2SPROC     OGLAPI::glMultiTexCoord2s = NULL;
    PFNGLMULTITEXCOORD2SVPROC    OGLAPI::glMultiTexCoord2sv = NULL;
    PFNGLMULTITEXCOORD3DPROC     OGLAPI::glMultiTexCoord3d = NULL;
    PFNGLMULTITEXCOORD3DVPROC    OGLAPI::glMultiTexCoord3dv = NULL;
    PFNGLMULTITEXCOORD3FPROC     OGLAPI::glMultiTexCoord3f = NULL;
    PFNGLMULTITEXCOORD3FVPROC    OGLAPI::glMultiTexCoord3fv = NULL;
    PFNGLMULTITEXCOORD3IPROC     OGLAPI::glMultiTexCoord3i = NULL;
    PFNGLMULTITEXCOORD3IVPROC    OGLAPI::glMultiTexCoord3iv = NULL;
    PFNGLMULTITEXCOORD3SPROC     OGLAPI::glMultiTexCoord3s = NULL;
    PFNGLMULTITEXCOORD3SVPROC    OGLAPI::glMultiTexCoord3sv = NULL;
    PFNGLMULTITEXCOORD4DPROC     OGLAPI::glMultiTexCoord4d = NULL;
    PFNGLMULTITEXCOORD4DVPROC    OGLAPI::glMultiTexCoord4dv = NULL;
    PFNGLMULTITEXCOORD4FPROC     OGLAPI::glMultiTexCoord4f = NULL;
    PFNGLMULTITEXCOORD4FVPROC    OGLAPI::glMultiTexCoord4fv = NULL;
    PFNGLMULTITEXCOORD4IPROC     OGLAPI::glMultiTexCoord4i = NULL;
    PFNGLMULTITEXCOORD4IVPROC    OGLAPI::glMultiTexCoord4iv = NULL;
    PFNGLMULTITEXCOORD4SPROC     OGLAPI::glMultiTexCoord4s = NULL;
    PFNGLMULTITEXCOORD4SVPROC    OGLAPI::glMultiTexCoord4sv = NULL;
    PFNGLLOADTRANSPOSEMATRIXFPROC OGLAPI::glLoadTransposeMatrixf = NULL;
    PFNGLLOADTRANSPOSEMATRIXDPROC OGLAPI::glLoadTransposeMatrixd = NULL;
    PFNGLMULTTRANSPOSEMATRIXFPROC OGLAPI::glMultTransposeMatrixf = NULL;
    PFNGLMULTTRANSPOSEMATRIXDPROC OGLAPI::glMultTransposeMatrixd = NULL;
    PFNGLSAMPLECOVERAGEPROC      OGLAPI::glSampleCoverage = NULL;
    PFNGLCOMPRESSEDTEXIMAGE3DPROC OGLAPI::glCompressedTexImage3D = NULL;
    PFNGLCOMPRESSEDTEXIMAGE2DPROC OGLAPI::glCompressedTexImage2D = NULL;
    PFNGLCOMPRESSEDTEXIMAGE1DPROC OGLAPI::glCompressedTexImage1D = NULL;
    PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC OGLAPI::glCompressedTexSubImage3D = NULL;
    PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC OGLAPI::glCompressedTexSubImage2D = NULL;
    PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC OGLAPI::glCompressedTexSubImage1D = NULL;
    PFNGLGETCOMPRESSEDTEXIMAGEPROC OGLAPI::glGetCompressedTexImage = NULL;
    PFNGLBLENDFUNCSEPARATEPROC   OGLAPI::glBlendFuncSeparate = NULL;
    PFNGLFOGCOORDFPROC           OGLAPI::glFogCoordf = NULL;
    PFNGLFOGCOORDFVPROC          OGLAPI::glFogCoordfv = NULL;
    PFNGLFOGCOORDDPROC           OGLAPI::glFogCoordd = NULL;
    PFNGLFOGCOORDDVPROC          OGLAPI::glFogCoorddv = NULL;
    PFNGLFOGCOORDPOINTERPROC     OGLAPI::glFogCoordPointer = NULL;
    PFNGLMULTIDRAWARRAYSPROC     OGLAPI::glMultiDrawArrays = NULL;
    PFNGLMULTIDRAWELEMENTSPROC   OGLAPI::glMultiDrawElements = NULL;
    PFNGLPOINTPARAMETERFPROC     OGLAPI::glPointParameterf = NULL;
    PFNGLPOINTPARAMETERFVPROC    OGLAPI::glPointParameterfv = NULL;
    PFNGLPOINTPARAMETERIPROC     OGLAPI::glPointParameteri = NULL;
    PFNGLPOINTPARAMETERIVPROC    OGLAPI::glPointParameteriv = NULL;
    PFNGLSECONDARYCOLOR3BPROC    OGLAPI::glSecondaryColor3b = NULL;
    PFNGLSECONDARYCOLOR3BVPROC   OGLAPI::glSecondaryColor3bv = NULL;
    PFNGLSECONDARYCOLOR3DPROC    OGLAPI::glSecondaryColor3d = NULL;
    PFNGLSECONDARYCOLOR3DVPROC   OGLAPI::glSecondaryColor3dv = NULL;
    PFNGLSECONDARYCOLOR3FPROC    OGLAPI::glSecondaryColor3f = NULL;
    PFNGLSECONDARYCOLOR3FVPROC   OGLAPI::glSecondaryColor3fv = NULL;
    PFNGLSECONDARYCOLOR3IPROC    OGLAPI::glSecondaryColor3i = NULL;
    PFNGLSECONDARYCOLOR3IVPROC   OGLAPI::glSecondaryColor3iv = NULL;
    PFNGLSECONDARYCOLOR3SPROC    OGLAPI::glSecondaryColor3s = NULL;
    PFNGLSECONDARYCOLOR3SVPROC   OGLAPI::glSecondaryColor3sv = NULL;
    PFNGLSECONDARYCOLOR3UBPROC   OGLAPI::glSecondaryColor3ub = NULL;
    PFNGLSECONDARYCOLOR3UBVPROC  OGLAPI::glSecondaryColor3ubv = NULL;
    PFNGLSECONDARYCOLOR3UIPROC   OGLAPI::glSecondaryColor3ui = NULL;
    PFNGLSECONDARYCOLOR3UIVPROC  OGLAPI::glSecondaryColor3uiv = NULL;
    PFNGLSECONDARYCOLOR3USPROC   OGLAPI::glSecondaryColor3us = NULL;
    PFNGLSECONDARYCOLOR3USVPROC  OGLAPI::glSecondaryColor3usv = NULL;
    PFNGLSECONDARYCOLORPOINTERPROC OGLAPI::glSecondaryColorPointer = NULL;
    PFNGLWINDOWPOS2DPROC         OGLAPI::glWindowPos2d = NULL;
    PFNGLWINDOWPOS2DVPROC        OGLAPI::glWindowPos2dv = NULL;
    PFNGLWINDOWPOS2FPROC         OGLAPI::glWindowPos2f = NULL;
    PFNGLWINDOWPOS2FVPROC        OGLAPI::glWindowPos2fv = NULL;
    PFNGLWINDOWPOS2IPROC         OGLAPI::glWindowPos2i = NULL;
    PFNGLWINDOWPOS2IVPROC        OGLAPI::glWindowPos2iv = NULL;
    PFNGLWINDOWPOS2SPROC         OGLAPI::glWindowPos2s = NULL;
    PFNGLWINDOWPOS2SVPROC        OGLAPI::glWindowPos2sv = NULL;
    PFNGLWINDOWPOS3DPROC         OGLAPI::glWindowPos3d = NULL;
    PFNGLWINDOWPOS3DVPROC        OGLAPI::glWindowPos3dv = NULL;
    PFNGLWINDOWPOS3FPROC         OGLAPI::glWindowPos3f = NULL;
    PFNGLWINDOWPOS3FVPROC        OGLAPI::glWindowPos3fv = NULL;
    PFNGLWINDOWPOS3IPROC         OGLAPI::glWindowPos3i = NULL;
    PFNGLWINDOWPOS3IVPROC        OGLAPI::glWindowPos3iv = NULL;
    PFNGLWINDOWPOS3SPROC         OGLAPI::glWindowPos3s = NULL;
    PFNGLWINDOWPOS3SVPROC        OGLAPI::glWindowPos3sv = NULL;
    PFNGLGENQUERIESPROC          OGLAPI::glGenQueries = NULL;
    PFNGLDELETEQUERIESPROC       OGLAPI::glDeleteQueries = NULL;
    PFNGLISQUERYPROC             OGLAPI::glIsQuery = NULL;
    PFNGLBEGINQUERYPROC          OGLAPI::glBeginQuery = NULL;
    PFNGLENDQUERYPROC            OGLAPI::glEndQuery = NULL;
    PFNGLGETQUERYIVPROC          OGLAPI::glGetQueryiv = NULL;
    PFNGLGETQUERYOBJECTIVPROC    OGLAPI::glGetQueryObjectiv = NULL;
    PFNGLGETQUERYOBJECTUIVPROC   OGLAPI::glGetQueryObjectuiv = NULL;
    PFNGLBINDBUFFERPROC          OGLAPI::glBindBuffer = NULL;
    PFNGLDELETEBUFFERSPROC       OGLAPI::glDeleteBuffers = NULL;
    PFNGLGENBUFFERSPROC          OGLAPI::glGenBuffers = NULL;
    PFNGLISBUFFERPROC            OGLAPI::glIsBuffer = NULL;
    PFNGLBUFFERDATAPROC          OGLAPI::glBufferData = NULL;
    PFNGLBUFFERSUBDATAPROC       OGLAPI::glBufferSubData = NULL;
    PFNGLGETBUFFERSUBDATAPROC    OGLAPI::glGetBufferSubData = NULL;
    PFNGLMAPBUFFERPROC           OGLAPI::glMapBuffer = NULL;
    PFNGLUNMAPBUFFERPROC         OGLAPI::glUnmapBuffer = NULL;
    PFNGLGETBUFFERPARAMETERIVPROC OGLAPI::glGetBufferParameteriv = NULL;
    PFNGLGETBUFFERPOINTERVPROC   OGLAPI::glGetBufferPointerv = NULL;
    PFNGLBLENDEQUATIONSEPARATEPROC OGLAPI::glBlendEquationSeparate = NULL;
    PFNGLDRAWBUFFERSPROC         OGLAPI::glDrawBuffers = NULL;
    PFNGLSTENCILOPSEPARATEPROC   OGLAPI::glStencilOpSeparate = NULL;
    PFNGLSTENCILFUNCSEPARATEPROC OGLAPI::glStencilFuncSeparate = NULL;
    PFNGLSTENCILMASKSEPARATEPROC OGLAPI::glStencilMaskSeparate = NULL;
    PFNGLATTACHSHADERPROC        OGLAPI::glAttachShader = NULL;
    PFNGLBINDATTRIBLOCATIONPROC  OGLAPI::glBindAttribLocation = NULL;
    PFNGLCOMPILESHADERPROC       OGLAPI::glCompileShader = NULL;
    PFNGLCREATEPROGRAMPROC       OGLAPI::glCreateProgram = NULL;
    PFNGLCREATESHADERPROC        OGLAPI::glCreateShader = NULL;
    PFNGLDELETEPROGRAMPROC       OGLAPI::glDeleteProgram = NULL;
    PFNGLDELETESHADERPROC        OGLAPI::glDeleteShader = NULL;
    PFNGLDETACHSHADERPROC        OGLAPI::glDetachShader = NULL;
    PFNGLDISABLEVERTEXATTRIBARRAYPROC OGLAPI::glDisableVertexAttribArray = NULL;
    PFNGLENABLEVERTEXATTRIBARRAYPROC OGLAPI::glEnableVertexAttribArray = NULL;
    PFNGLGETACTIVEATTRIBPROC     OGLAPI::glGetActiveAttrib = NULL;
    PFNGLGETACTIVEUNIFORMPROC    OGLAPI::glGetActiveUniform = NULL;
    PFNGLGETATTACHEDSHADERSPROC  OGLAPI::glGetAttachedShaders = NULL;
    PFNGLGETATTRIBLOCATIONPROC   OGLAPI::glGetAttribLocation = NULL;
    PFNGLGETPROGRAMIVPROC        OGLAPI::glGetProgramiv = NULL;
    PFNGLGETPROGRAMINFOLOGPROC   OGLAPI::glGetProgramInfoLog = NULL;
    PFNGLGETSHADERIVPROC         OGLAPI::glGetShaderiv = NULL;
    PFNGLGETSHADERINFOLOGPROC    OGLAPI::glGetShaderInfoLog = NULL;
    PFNGLGETSHADERSOURCEPROC     OGLAPI::glGetShaderSource = NULL;
    PFNGLGETUNIFORMLOCATIONPROC  OGLAPI::glGetUniformLocation = NULL;
    PFNGLGETUNIFORMFVPROC        OGLAPI::glGetUniformfv = NULL;
    PFNGLGETUNIFORMIVPROC        OGLAPI::glGetUniformiv = NULL;
    PFNGLGETVERTEXATTRIBDVPROC   OGLAPI::glGetVertexAttribdv = NULL;
    PFNGLGETVERTEXATTRIBFVPROC   OGLAPI::glGetVertexAttribfv = NULL;
    PFNGLGETVERTEXATTRIBIVPROC   OGLAPI::glGetVertexAttribiv = NULL;
    PFNGLGETVERTEXATTRIBPOINTERVPROC OGLAPI::glGetVertexAttribPointerv = NULL;
    PFNGLISPROGRAMPROC           OGLAPI::glIsProgram = NULL;
    PFNGLISSHADERPROC            OGLAPI::glIsShader = NULL;
    PFNGLLINKPROGRAMPROC         OGLAPI::glLinkProgram = NULL;
    PFNGLSHADERSOURCEPROC        OGLAPI::glShaderSource = NULL;
    PFNGLUSEPROGRAMPROC          OGLAPI::glUseProgram = NULL;
    PFNGLUNIFORM1FPROC           OGLAPI::glUniform1f = NULL;
    PFNGLUNIFORM2FPROC           OGLAPI::glUniform2f = NULL;
    PFNGLUNIFORM3FPROC           OGLAPI::glUniform3f = NULL;
    PFNGLUNIFORM4FPROC           OGLAPI::glUniform4f = NULL;
    PFNGLUNIFORM1IPROC           OGLAPI::glUniform1i = NULL;
    PFNGLUNIFORM2IPROC           OGLAPI::glUniform2i = NULL;
    PFNGLUNIFORM3IPROC           OGLAPI::glUniform3i = NULL;
    PFNGLUNIFORM4IPROC           OGLAPI::glUniform4i = NULL;
    PFNGLUNIFORM1FVPROC          OGLAPI::glUniform1fv = NULL;
    PFNGLUNIFORM2FVPROC          OGLAPI::glUniform2fv = NULL;
    PFNGLUNIFORM3FVPROC          OGLAPI::glUniform3fv = NULL;
    PFNGLUNIFORM4FVPROC          OGLAPI::glUniform4fv = NULL;
    PFNGLUNIFORM1IVPROC          OGLAPI::glUniform1iv = NULL;
    PFNGLUNIFORM2IVPROC          OGLAPI::glUniform2iv = NULL;
    PFNGLUNIFORM3IVPROC          OGLAPI::glUniform3iv = NULL;
    PFNGLUNIFORM4IVPROC          OGLAPI::glUniform4iv = NULL;
    PFNGLUNIFORMMATRIX2FVPROC    OGLAPI::glUniformMatrix2fv = NULL;
    PFNGLUNIFORMMATRIX3FVPROC    OGLAPI::glUniformMatrix3fv = NULL;
    PFNGLUNIFORMMATRIX4FVPROC    OGLAPI::glUniformMatrix4fv = NULL;
    PFNGLVALIDATEPROGRAMPROC     OGLAPI::glValidateProgram = NULL;
    PFNGLVERTEXATTRIB1DPROC      OGLAPI::glVertexAttrib1d = NULL;
    PFNGLVERTEXATTRIB1DVPROC     OGLAPI::glVertexAttrib1dv = NULL;
    PFNGLVERTEXATTRIB1FPROC      OGLAPI::glVertexAttrib1f = NULL;
    PFNGLVERTEXATTRIB1FVPROC     OGLAPI::glVertexAttrib1fv = NULL;
    PFNGLVERTEXATTRIB1SPROC      OGLAPI::glVertexAttrib1s = NULL;
    PFNGLVERTEXATTRIB1SVPROC     OGLAPI::glVertexAttrib1sv = NULL;
    PFNGLVERTEXATTRIB2DPROC      OGLAPI::glVertexAttrib2d = NULL;
    PFNGLVERTEXATTRIB2DVPROC     OGLAPI::glVertexAttrib2dv = NULL;
    PFNGLVERTEXATTRIB2FPROC      OGLAPI::glVertexAttrib2f = NULL;
    PFNGLVERTEXATTRIB2FVPROC     OGLAPI::glVertexAttrib2fv = NULL;
    PFNGLVERTEXATTRIB2SPROC      OGLAPI::glVertexAttrib2s = NULL;
    PFNGLVERTEXATTRIB2SVPROC     OGLAPI::glVertexAttrib2sv = NULL;
    PFNGLVERTEXATTRIB3DPROC      OGLAPI::glVertexAttrib3d = NULL;
    PFNGLVERTEXATTRIB3DVPROC     OGLAPI::glVertexAttrib3dv = NULL;
    PFNGLVERTEXATTRIB3FPROC      OGLAPI::glVertexAttrib3f = NULL;
    PFNGLVERTEXATTRIB3FVPROC     OGLAPI::glVertexAttrib3fv = NULL;
    PFNGLVERTEXATTRIB3SPROC      OGLAPI::glVertexAttrib3s = NULL;
    PFNGLVERTEXATTRIB3SVPROC     OGLAPI::glVertexAttrib3sv = NULL;
    PFNGLVERTEXATTRIB4NBVPROC    OGLAPI::glVertexAttrib4Nbv = NULL;
    PFNGLVERTEXATTRIB4NIVPROC    OGLAPI::glVertexAttrib4Niv = NULL;
    PFNGLVERTEXATTRIB4NSVPROC    OGLAPI::glVertexAttrib4Nsv = NULL;
    PFNGLVERTEXATTRIB4NUBPROC    OGLAPI::glVertexAttrib4Nub = NULL;
    PFNGLVERTEXATTRIB4NUBVPROC   OGLAPI::glVertexAttrib4Nubv = NULL;
    PFNGLVERTEXATTRIB4NUIVPROC   OGLAPI::glVertexAttrib4Nuiv = NULL;
    PFNGLVERTEXATTRIB4NUSVPROC   OGLAPI::glVertexAttrib4Nusv = NULL;
    PFNGLVERTEXATTRIB4BVPROC     OGLAPI::glVertexAttrib4bv = NULL;
    PFNGLVERTEXATTRIB4DPROC      OGLAPI::glVertexAttrib4d = NULL;
    PFNGLVERTEXATTRIB4DVPROC     OGLAPI::glVertexAttrib4dv = NULL;
    PFNGLVERTEXATTRIB4FPROC      OGLAPI::glVertexAttrib4f = NULL;
    PFNGLVERTEXATTRIB4FVPROC     OGLAPI::glVertexAttrib4fv = NULL;
    PFNGLVERTEXATTRIB4IVPROC     OGLAPI::glVertexAttrib4iv = NULL;
    PFNGLVERTEXATTRIB4SPROC      OGLAPI::glVertexAttrib4s = NULL;
    PFNGLVERTEXATTRIB4SVPROC     OGLAPI::glVertexAttrib4sv = NULL;
    PFNGLVERTEXATTRIB4UBVPROC    OGLAPI::glVertexAttrib4ubv = NULL;
    PFNGLVERTEXATTRIB4UIVPROC    OGLAPI::glVertexAttrib4uiv = NULL;
    PFNGLVERTEXATTRIB4USVPROC    OGLAPI::glVertexAttrib4usv = NULL;
    PFNGLVERTEXATTRIBPOINTERPROC OGLAPI::glVertexAttribPointer = NULL;
    PFNGLUNIFORMMATRIX2X3FVPROC  OGLAPI::glUniformMatrix2x3fv = NULL;
    PFNGLUNIFORMMATRIX3X2FVPROC  OGLAPI::glUniformMatrix3x2fv = NULL;
    PFNGLUNIFORMMATRIX2X4FVPROC  OGLAPI::glUniformMatrix2x4fv = NULL;
    PFNGLUNIFORMMATRIX4X2FVPROC  OGLAPI::glUniformMatrix4x2fv = NULL;
    PFNGLUNIFORMMATRIX3X4FVPROC  OGLAPI::glUniformMatrix3x4fv = NULL;
    PFNGLUNIFORMMATRIX4X3FVPROC  OGLAPI::glUniformMatrix4x3fv = NULL;
    ////////////////////////////////////////////////////////////////////////////////////////////////
    bool InitializeOpenGLAPI(const char* _moduleName)
    {
        if( OGLAPI::hModule != NULL )
        {
            return true;
        }
        OGLAPI::hModule = DynamicModule::loadModule(_moduleName);
        if( OGLAPI::hModule == NULL )
        {
            return false;
        }

        PFNGLXGETPROCADDRESS pGlXGetProcAddress = reinterpret_cast<PFNGLXGETPROCADDRESS>(DynamicModule::getFunction(OGLAPI::hModule, "wglGetProcAddress"));
        if( pGlXGetProcAddress == NULL )
        {
            pGlXGetProcAddress = reinterpret_cast<PFNGLXGETPROCADDRESS>(DynamicModule::getFunction(OGLAPI::hModule, "glXGetProcAddress"));
        }
#define NANE_OGL_LOADFUNCTION( funcType, funcName )\
        if( pGlXGetProcAddress != NULL )\
        {\
            OGLAPI::funcName = reinterpret_cast<funcType>(pGlXGetProcAddress(#funcName));\
        }\
        if( OGLAPI::funcName == NULL )\
        {\
            OGLAPI::funcName = reinterpret_cast<funcType>(DynamicModule::getFunction(OGLAPI::hModule, #funcName));\
        }\
        if( OGLAPI::funcName == NULL)\
        {\
            error = true;\
        }

#define NANE_OGL_LOADFUNCTION2( funcType, funcName, funcName2 )\
        if( pGlXGetProcAddress != NULL )\
        {\
            OGLAPI::funcName = reinterpret_cast<funcType>(pGlXGetProcAddress(#funcName));\
        }\
        if( OGLAPI::funcName == NULL )\
        {\
            OGLAPI::funcName = reinterpret_cast<funcType>(DynamicModule::getFunction(OGLAPI::hModule, #funcName));\
        }\
        if( OGLAPI::funcName == NULL )\
        {\
            OGLAPI::funcName = reinterpret_cast<funcType>(DynamicModule::getFunction(OGLAPI::hModule, #funcName2));\
        }\
        if( OGLAPI::funcName == NULL)\
        {\
            LOG_ERROR("Failed to load '%1' function address\n") << #funcName;\
            error = true;\
        }

        
        bool error = false;
        OGLAPI::version = GLAPI_UNKNOWN;
        NANE_OGL_LOADFUNCTION(PFNGLCLEARCOLOR, glClearColor);
        NANE_OGL_LOADFUNCTION(PFNGLCLEAR, glClear);
        NANE_OGL_LOADFUNCTION(PFNGLCOLORMASK, glColorMask);
        NANE_OGL_LOADFUNCTION(PFNGLALPHAFUNC, glAlphaFunc);
        NANE_OGL_LOADFUNCTION(PFNGLBLENDFUNC, glBlendFunc);
        NANE_OGL_LOADFUNCTION(PFNGLLOGICOP, glLogicOp);
        NANE_OGL_LOADFUNCTION(PFNGLCULLFACE, glCullFace);
        NANE_OGL_LOADFUNCTION(PFNGLFRONTFACE, glFrontFace);
        NANE_OGL_LOADFUNCTION(PFNGLPOINTSIZE, glPointSize);
        NANE_OGL_LOADFUNCTION(PFNGLLINEWIDTH, glLineWidth);
        NANE_OGL_LOADFUNCTION(PFNGLPOLYGONOFFSET, glPolygonOffset);
        NANE_OGL_LOADFUNCTION(PFNGLSCISSOR, glScissor);
        NANE_OGL_LOADFUNCTION2(PFNGLCLIPPLANE, glClipPlane, glClipPlanef);
        NANE_OGL_LOADFUNCTION2(PFNGLGETCLIPPLANE, glGetClipPlane, glGetClipPlanef);
        NANE_OGL_LOADFUNCTION(PFNGLENABLE, glEnable);
        NANE_OGL_LOADFUNCTION(PFNGLDISABLE, glDisable);
        NANE_OGL_LOADFUNCTION(PFNGLISENABLED, glIsEnabled);
        NANE_OGL_LOADFUNCTION(PFNGLGETERROR, glGetError);
        NANE_OGL_LOADFUNCTION(PFNGLGETSTRING, glGetString);
        NANE_OGL_LOADFUNCTION(PFNGLFINISH, glFinish);
        NANE_OGL_LOADFUNCTION(PFNGLFLUSH, glFlush);
        NANE_OGL_LOADFUNCTION(PFNGLHINT, glHint);
        NANE_OGL_LOADFUNCTION2(PFNGLCLEARDEPTH, glClearDepth, glClearDepthf);
        NANE_OGL_LOADFUNCTION(PFNGLDEPTHFUNC, glDepthFunc);
        NANE_OGL_LOADFUNCTION(PFNGLDEPTHMASK, glDepthMask);
        NANE_OGL_LOADFUNCTION2(PFNGLDEPTHRANGE, glDepthRange, glDepthRangef);
        NANE_OGL_LOADFUNCTION(PFNGLMATRIXMODE, glMatrixMode);
        NANE_OGL_LOADFUNCTION2(PFNGLORTHO, glOrtho, glOrthof);
        NANE_OGL_LOADFUNCTION2(PFNGLFRUSTUM, glFrustum, glFrustumf);
        NANE_OGL_LOADFUNCTION(PFNGLVIEWPORT, glViewport);
        NANE_OGL_LOADFUNCTION(PFNGLPUSHMATRIX, glPushMatrix);
        NANE_OGL_LOADFUNCTION(PFNGLPOPMATRIX, glPopMatrix);
        NANE_OGL_LOADFUNCTION(PFNGLLOADIDENTITY, glLoadIdentity);
        NANE_OGL_LOADFUNCTION(PFNGLLOADMATRIXF, glLoadMatrixf);
        NANE_OGL_LOADFUNCTION(PFNGLMULTMATRIXF, glMultMatrixf);
        NANE_OGL_LOADFUNCTION(PFNGLROTATEF, glRotatef);
        NANE_OGL_LOADFUNCTION(PFNGLSCALEF, glScalef);
        NANE_OGL_LOADFUNCTION(PFNGLTRANSLATEF, glTranslatef);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3F, glNormal3f);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4F, glColor4f);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4UB, glColor4ub);
        NANE_OGL_LOADFUNCTION(PFNGLSHADEMODEL, glShadeModel);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTF, glLightf);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTFV, glLightfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETLIGHTFV, glGetLightfv);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTMODELF, glLightModelf);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTMODELFV, glLightModelfv);
        NANE_OGL_LOADFUNCTION(PFNGLMATERIALF, glMaterialf);
        NANE_OGL_LOADFUNCTION(PFNGLMATERIALFV, glMaterialfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETMATERIALFV, glGetMaterialfv);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELSTOREI, glPixelStorei);
        NANE_OGL_LOADFUNCTION(PFNGLREADPIXELS, glReadPixels);
        NANE_OGL_LOADFUNCTION(PFNGLSTENCILFUNC, glStencilFunc);
        NANE_OGL_LOADFUNCTION(PFNGLSTENCILMASK, glStencilMask);
        NANE_OGL_LOADFUNCTION(PFNGLSTENCILOP, glStencilOp);
        NANE_OGL_LOADFUNCTION(PFNGLCLEARSTENCIL, glClearStencil);
        NANE_OGL_LOADFUNCTION(PFNGLTEXENVF, glTexEnvf);
        NANE_OGL_LOADFUNCTION(PFNGLTEXENVI, glTexEnvi);
        NANE_OGL_LOADFUNCTION(PFNGLTEXENVFV, glTexEnvfv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXENVIV, glTexEnviv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXENVFV, glGetTexEnvfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXENVIV, glGetTexEnviv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXPARAMETERF, glTexParameterf);
        NANE_OGL_LOADFUNCTION(PFNGLTEXPARAMETERI, glTexParameteri);
        NANE_OGL_LOADFUNCTION(PFNGLTEXPARAMETERFV, glTexParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXPARAMETERIV, glTexParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXPARAMETERFV, glGetTexParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXPARAMETERIV, glGetTexParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXIMAGE2D, glTexImage2D);
        NANE_OGL_LOADFUNCTION(PFNGLFOGF, glFogf);
        NANE_OGL_LOADFUNCTION(PFNGLFOGFV, glFogfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETBOOLEANV, glGetBooleanv);
        NANE_OGL_LOADFUNCTION(PFNGLGETFLOATV, glGetFloatv);
        NANE_OGL_LOADFUNCTION(PFNGLGETINTEGERV, glGetIntegerv);
        if( error == false )
        {
            OGLAPI::version = GLAPI_1_0_ES;
        }
        
        NANE_OGL_LOADFUNCTION(PFNGLCLEARINDEX, glClearIndex);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXMASK, glIndexMask);
        NANE_OGL_LOADFUNCTION(PFNGLLINESTIPPLE, glLineStipple);
        NANE_OGL_LOADFUNCTION(PFNGLPOLYGONMODE, glPolygonMode);
        NANE_OGL_LOADFUNCTION(PFNGLPOLYGONSTIPPLE, glPolygonStipple);
        NANE_OGL_LOADFUNCTION(PFNGLGETPOLYGONSTIPPLE, glGetPolygonStipple);
        NANE_OGL_LOADFUNCTION(PFNGLEDGEFLAG, glEdgeFlag);
        NANE_OGL_LOADFUNCTION(PFNGLEDGEFLAGV, glEdgeFlagv);
        NANE_OGL_LOADFUNCTION(PFNGLDRAWBUFFER, glDrawBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLREADBUFFER, glReadBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLGETDOUBLEV, glGetDoublev);
        NANE_OGL_LOADFUNCTION(PFNGLPUSHATTRIB, glPushAttrib);
        NANE_OGL_LOADFUNCTION(PFNGLPOPATTRIB, glPopAttrib);
        NANE_OGL_LOADFUNCTION(PFNGLRENDERMODE, glRenderMode);
        NANE_OGL_LOADFUNCTION(PFNGLCLEARACCUM, glClearAccum);
        NANE_OGL_LOADFUNCTION(PFNGLACCUM, glAccum);
        NANE_OGL_LOADFUNCTION(PFNGLLOADMATRIXD, glLoadMatrixd);
        NANE_OGL_LOADFUNCTION(PFNGLMULTMATRIXD, glMultMatrixd);
        NANE_OGL_LOADFUNCTION(PFNGLROTATED, glRotated);
        NANE_OGL_LOADFUNCTION(PFNGLSCALED, glScaled);
        NANE_OGL_LOADFUNCTION(PFNGLTRANSLATED, glTranslated);
        NANE_OGL_LOADFUNCTION(PFNGLISLIST, glIsList);
        NANE_OGL_LOADFUNCTION(PFNGLDELETELISTS, glDeleteLists);
        NANE_OGL_LOADFUNCTION(PFNGLGENLISTS, glGenLists);
        NANE_OGL_LOADFUNCTION(PFNGLNEWLIST, glNewList);
        NANE_OGL_LOADFUNCTION(PFNGLENDLIST, glEndList);
        NANE_OGL_LOADFUNCTION(PFNGLCALLLIST, glCallList);
        NANE_OGL_LOADFUNCTION(PFNGLCALLLISTS, glCallLists);
        NANE_OGL_LOADFUNCTION(PFNGLLISTBASE, glListBase);
        NANE_OGL_LOADFUNCTION(PFNGLBEGIN, glBegin);
        NANE_OGL_LOADFUNCTION(PFNGLEND, glEnd);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2D, glVertex2d);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2F, glVertex2f);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2I, glVertex2i);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2S, glVertex2s);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3D, glVertex3d);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3F, glVertex3f);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3I, glVertex3i);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3S, glVertex3s);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4D, glVertex4d);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4F, glVertex4f);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4I, glVertex4i);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4S, glVertex4s);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2DV, glVertex2dv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2FV, glVertex2fv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2IV, glVertex2iv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX2SV, glVertex2sv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3DV, glVertex3dv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3FV, glVertex3fv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3IV, glVertex3iv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX3SV, glVertex3sv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4DV, glVertex4dv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4FV, glVertex4fv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4IV, glVertex4iv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEX4SV, glVertex4sv);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3B, glNormal3b);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3D, glNormal3d);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3I, glNormal3i);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3S, glNormal3s);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3BV, glNormal3bv);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3DV, glNormal3dv);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3FV, glNormal3fv);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3IV, glNormal3iv);
        NANE_OGL_LOADFUNCTION(PFNGLNORMAL3SV, glNormal3sv);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXD, glIndexd);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXF, glIndexf);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXI, glIndexi);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXS, glIndexs);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXDV, glIndexdv);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXFV, glIndexfv);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXIV, glIndexiv);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXSV, glIndexsv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3B, glColor3b);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3D, glColor3d);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3F, glColor3f);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3I, glColor3i);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3S, glColor3s);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3UB, glColor3ub);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3UI, glColor3ui);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3US, glColor3us);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4B, glColor4b);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4D, glColor4d);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4I, glColor4i);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4S, glColor4s);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4UI, glColor4ui);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4US, glColor4us);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3BV, glColor3bv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3DV, glColor3dv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3FV, glColor3fv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3IV, glColor3iv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3SV, glColor3sv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3UBV, glColor3ubv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3UIV, glColor3uiv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR3USV, glColor3usv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4BV, glColor4bv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4DV, glColor4dv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4FV, glColor4fv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4IV, glColor4iv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4SV, glColor4sv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4UBV, glColor4ubv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4UIV, glColor4uiv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLOR4USV, glColor4usv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1D, glTexCoord1d);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1F, glTexCoord1f);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1I, glTexCoord1i);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1S, glTexCoord1s);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2D, glTexCoord2d);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2F, glTexCoord2f);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2I, glTexCoord2i);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2S, glTexCoord2s);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3D, glTexCoord3d);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3F, glTexCoord3f);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3I, glTexCoord3i);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3S, glTexCoord3s);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4D, glTexCoord4d);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4F, glTexCoord4f);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4I, glTexCoord4i);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4S, glTexCoord4s);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1DV, glTexCoord1dv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1FV, glTexCoord1fv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1IV, glTexCoord1iv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD1SV, glTexCoord1sv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2DV, glTexCoord2dv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2FV, glTexCoord2fv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2IV, glTexCoord2iv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD2SV, glTexCoord2sv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3DV, glTexCoord3dv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3FV, glTexCoord3fv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3IV, glTexCoord3iv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD3SV, glTexCoord3sv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4DV, glTexCoord4dv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4FV, glTexCoord4fv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4IV, glTexCoord4iv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORD4SV, glTexCoord4sv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2D, glRasterPos2d);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2F, glRasterPos2f);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2I, glRasterPos2i);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2S, glRasterPos2s);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3D, glRasterPos3d);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3F, glRasterPos3f);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3I, glRasterPos3i);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3S, glRasterPos3s);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4D, glRasterPos4d);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4F, glRasterPos4f);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4I, glRasterPos4i);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4S, glRasterPos4s);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2DV, glRasterPos2dv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2FV, glRasterPos2fv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2IV, glRasterPos2iv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS2SV, glRasterPos2sv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3DV, glRasterPos3dv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3FV, glRasterPos3fv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3IV, glRasterPos3iv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS3SV, glRasterPos3sv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4DV, glRasterPos4dv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4FV, glRasterPos4fv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4IV, glRasterPos4iv);
        NANE_OGL_LOADFUNCTION(PFNGLRASTERPOS4SV, glRasterPos4sv);
        NANE_OGL_LOADFUNCTION(PFNGLRECTD, glRectd);
        NANE_OGL_LOADFUNCTION(PFNGLRECTF, glRectf);
        NANE_OGL_LOADFUNCTION(PFNGLRECTI, glRecti);
        NANE_OGL_LOADFUNCTION(PFNGLRECTS, glRects);
        NANE_OGL_LOADFUNCTION(PFNGLRECTDV, glRectdv);
        NANE_OGL_LOADFUNCTION(PFNGLRECTFV, glRectfv);
        NANE_OGL_LOADFUNCTION(PFNGLRECTIV, glRectiv);
        NANE_OGL_LOADFUNCTION(PFNGLRECTSV, glRectsv);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTI, glLighti);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTIV, glLightiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETLIGHTIV, glGetLightiv);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTMODELI, glLightModeli);
        NANE_OGL_LOADFUNCTION(PFNGLLIGHTMODELIV, glLightModeliv);
        NANE_OGL_LOADFUNCTION(PFNGLMATERIALIV, glMaterialiv);
        NANE_OGL_LOADFUNCTION(PFNGLMATERIALI, glMateriali);
        NANE_OGL_LOADFUNCTION(PFNGLGETMATERIALIV, glGetMaterialiv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLORMATERIAL, glColorMaterial);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELZOOM, glPixelZoom);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELSTOREF, glPixelStoref);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELTRANSFERF, glPixelTransferf);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELTRANSFERI, glPixelTransferi);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELMAPFV, glPixelMapfv);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELMAPUIV, glPixelMapuiv);
        NANE_OGL_LOADFUNCTION(PFNGLPIXELMAPUSV, glPixelMapusv);
        NANE_OGL_LOADFUNCTION(PFNGLGETPIXELMAPFV, glGetPixelMapfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETPIXELMAPUIV, glGetPixelMapuiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETPIXELMAPUSV, glGetPixelMapusv);
        NANE_OGL_LOADFUNCTION(PFNGLBITMAP, glBitmap);
        NANE_OGL_LOADFUNCTION(PFNGLDRAWPIXELS, glDrawPixels);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYPIXELS, glCopyPixels);
        NANE_OGL_LOADFUNCTION(PFNGLTEXGEND, glTexGend);
        NANE_OGL_LOADFUNCTION(PFNGLTEXGENF, glTexGenf);
        NANE_OGL_LOADFUNCTION(PFNGLTEXGENI, glTexGeni);
        NANE_OGL_LOADFUNCTION(PFNGLTEXGENDV, glTexGendv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXGENFV, glTexGenfv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXGENIV, glTexGeniv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXGENDV, glGetTexGendv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXGENFV, glGetTexGenfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXGENIV, glGetTexGeniv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXLEVELPARAMETERFV, glGetTexLevelParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXLEVELPARAMETERIV, glGetTexLevelParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLTEXIMAGE1D, glTexImage1D);
        NANE_OGL_LOADFUNCTION(PFNGLGETTEXIMAGE, glGetTexImage);
        NANE_OGL_LOADFUNCTION(PFNGLMAP1D, glMap1d);
        NANE_OGL_LOADFUNCTION(PFNGLMAP1F, glMap1f);
        NANE_OGL_LOADFUNCTION(PFNGLMAP2D, glMap2d);
        NANE_OGL_LOADFUNCTION(PFNGLMAP2F, glMap2f);
        NANE_OGL_LOADFUNCTION(PFNGLGETMAPDV, glGetMapdv);
        NANE_OGL_LOADFUNCTION(PFNGLGETMAPFV, glGetMapfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETMAPIV, glGetMapiv);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD1D, glEvalCoord1d);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD1F, glEvalCoord1f);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD1DV, glEvalCoord1dv);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD1FV, glEvalCoord1fv);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD2D, glEvalCoord2d);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD2F, glEvalCoord2f);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD2DV, glEvalCoord2dv);
        NANE_OGL_LOADFUNCTION(PFNGLEVALCOORD2FV, glEvalCoord2fv);
        NANE_OGL_LOADFUNCTION(PFNGLMAPGRID1D, glMapGrid1d);
        NANE_OGL_LOADFUNCTION(PFNGLMAPGRID1F, glMapGrid1f);
        NANE_OGL_LOADFUNCTION(PFNGLMAPGRID2D, glMapGrid2d);
        NANE_OGL_LOADFUNCTION(PFNGLMAPGRID2F, glMapGrid2f);
        NANE_OGL_LOADFUNCTION(PFNGLEVALPOINT1, glEvalPoint1);
        NANE_OGL_LOADFUNCTION(PFNGLEVALPOINT2, glEvalPoint2);
        NANE_OGL_LOADFUNCTION(PFNGLEVALMESH1, glEvalMesh1);
        NANE_OGL_LOADFUNCTION(PFNGLEVALMESH2, glEvalMesh2);
        NANE_OGL_LOADFUNCTION(PFNGLFOGI, glFogi);
        NANE_OGL_LOADFUNCTION(PFNGLFOGIV, glFogiv);
        NANE_OGL_LOADFUNCTION(PFNGLFEEDBACKBUFFER, glFeedbackBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLPASSTHROUGH, glPassThrough);
        NANE_OGL_LOADFUNCTION(PFNGLSELECTBUFFER, glSelectBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLINITNAMES, glInitNames);
        NANE_OGL_LOADFUNCTION(PFNGLLOADNAME, glLoadName);
        NANE_OGL_LOADFUNCTION(PFNGLPUSHNAME, glPushName);
        NANE_OGL_LOADFUNCTION(PFNGLPOPNAME, glPopName);
        if( error == false )
        {
            OGLAPI::version = GLAPI_1_0;
        }
        
        error = false;
        NANE_OGL_LOADFUNCTION(PFNGLENABLECLIENTSTATE, glEnableClientState);
        NANE_OGL_LOADFUNCTION(PFNGLDISABLECLIENTSTATE, glDisableClientState);
        NANE_OGL_LOADFUNCTION(PFNGLGENTEXTURES, glGenTextures);
        NANE_OGL_LOADFUNCTION(PFNGLDELETETEXTURES, glDeleteTextures);
        NANE_OGL_LOADFUNCTION(PFNGLBINDTEXTURE, glBindTexture);
        NANE_OGL_LOADFUNCTION(PFNGLISTEXTURE, glIsTexture);
        NANE_OGL_LOADFUNCTION(PFNGLTEXSUBIMAGE2D, glTexSubImage2D);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYTEXIMAGE2D, glCopyTexImage2D);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYTEXSUBIMAGE2D, glCopyTexSubImage2D);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXPOINTER, glVertexPointer);
        NANE_OGL_LOADFUNCTION(PFNGLNORMALPOINTER, glNormalPointer);
        NANE_OGL_LOADFUNCTION(PFNGLCOLORPOINTER, glColorPointer);
        NANE_OGL_LOADFUNCTION(PFNGLTEXCOORDPOINTER, glTexCoordPointer);
        NANE_OGL_LOADFUNCTION(PFNGLGETPOINTERV, glGetPointerv);
        NANE_OGL_LOADFUNCTION(PFNGLDRAWARRAYS, glDrawArrays);
        NANE_OGL_LOADFUNCTION(PFNGLDRAWELEMENTS, glDrawElements);
        if( error == false && OGLAPI::version >= GLAPI_1_0_ES )
        {
            OGLAPI::version = GLAPI_1_1_ES;
        }
        
        NANE_OGL_LOADFUNCTION(PFNGLPUSHCLIENTATTRIB, glPushClientAttrib);
        NANE_OGL_LOADFUNCTION(PFNGLPOPCLIENTATTRIB, glPopClientAttrib);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXUB, glIndexub);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXUBV, glIndexubv);
        NANE_OGL_LOADFUNCTION(PFNGLPRIORITIZETEXTURES, glPrioritizeTextures);
        NANE_OGL_LOADFUNCTION(PFNGLARETEXTURESRESIDENT, glAreTexturesResident);
        NANE_OGL_LOADFUNCTION(PFNGLTEXSUBIMAGE1D, glTexSubImage1D);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYTEXIMAGE1D, glCopyTexImage1D);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYTEXSUBIMAGE1D, glCopyTexSubImage1D);
        NANE_OGL_LOADFUNCTION(PFNGLINDEXPOINTER, glIndexPointer);
        NANE_OGL_LOADFUNCTION(PFNGLEDGEFLAGPOINTER, glEdgeFlagPointer);
        NANE_OGL_LOADFUNCTION(PFNGLARRAYELEMENT, glArrayElement);
        NANE_OGL_LOADFUNCTION(PFNGLINTERLEAVEDARRAYS, glInterleavedArrays);
        if( error == false && OGLAPI::version >= GLAPI_1_0 )
        {
            OGLAPI::version = GLAPI_1_1;
        }
        
        error = false;
        NANE_OGL_LOADFUNCTION(PFNGLBLENDCOLORPROC, glBlendColor);
        NANE_OGL_LOADFUNCTION(PFNGLBLENDEQUATIONPROC, glBlendEquation);
        NANE_OGL_LOADFUNCTION(PFNGLDRAWRANGEELEMENTSPROC, glDrawRangeElements);
        NANE_OGL_LOADFUNCTION(PFNGLCOLORTABLEPROC, glColorTable);
        NANE_OGL_LOADFUNCTION(PFNGLCOLORTABLEPARAMETERFVPROC, glColorTableParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLORTABLEPARAMETERIVPROC, glColorTableParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYCOLORTABLEPROC, glCopyColorTable);
        NANE_OGL_LOADFUNCTION(PFNGLGETCOLORTABLEPROC, glGetColorTable);
        NANE_OGL_LOADFUNCTION(PFNGLGETCOLORTABLEPARAMETERFVPROC, glGetColorTableParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETCOLORTABLEPARAMETERIVPROC, glGetColorTableParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLCOLORSUBTABLEPROC, glColorSubTable);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYCOLORSUBTABLEPROC, glCopyColorSubTable);
        NANE_OGL_LOADFUNCTION(PFNGLCONVOLUTIONFILTER1DPROC, glConvolutionFilter1D);
        NANE_OGL_LOADFUNCTION(PFNGLCONVOLUTIONFILTER2DPROC, glConvolutionFilter2D);
        NANE_OGL_LOADFUNCTION(PFNGLCONVOLUTIONPARAMETERFPROC, glConvolutionParameterf);
        NANE_OGL_LOADFUNCTION(PFNGLCONVOLUTIONPARAMETERFVPROC, glConvolutionParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLCONVOLUTIONPARAMETERIPROC, glConvolutionParameteri);
        NANE_OGL_LOADFUNCTION(PFNGLCONVOLUTIONPARAMETERIVPROC, glConvolutionParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYCONVOLUTIONFILTER1DPROC, glCopyConvolutionFilter1D);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYCONVOLUTIONFILTER2DPROC, glCopyConvolutionFilter2D);
        NANE_OGL_LOADFUNCTION(PFNGLGETCONVOLUTIONFILTERPROC, glGetConvolutionFilter);
        NANE_OGL_LOADFUNCTION(PFNGLGETCONVOLUTIONPARAMETERFVPROC, glGetConvolutionParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETCONVOLUTIONPARAMETERIVPROC, glGetConvolutionParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLGETSEPARABLEFILTERPROC, glGetSeparableFilter);
        NANE_OGL_LOADFUNCTION(PFNGLSEPARABLEFILTER2DPROC, glSeparableFilter2D);
        NANE_OGL_LOADFUNCTION(PFNGLGETHISTOGRAMPROC, glGetHistogram);
        NANE_OGL_LOADFUNCTION(PFNGLGETHISTOGRAMPARAMETERFVPROC, glGetHistogramParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETHISTOGRAMPARAMETERIVPROC, glGetHistogramParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLGETMINMAXPROC, glGetMinmax);
        NANE_OGL_LOADFUNCTION(PFNGLGETMINMAXPARAMETERFVPROC, glGetMinmaxParameterfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETMINMAXPARAMETERIVPROC, glGetMinmaxParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLHISTOGRAMPROC, glHistogram);
        NANE_OGL_LOADFUNCTION(PFNGLMINMAXPROC, glMinmax);
        NANE_OGL_LOADFUNCTION(PFNGLRESETHISTOGRAMPROC, glResetHistogram);
        NANE_OGL_LOADFUNCTION(PFNGLRESETMINMAXPROC, glResetMinmax);
        NANE_OGL_LOADFUNCTION(PFNGLTEXIMAGE3DPROC, glTexImage3D);
        NANE_OGL_LOADFUNCTION(PFNGLTEXSUBIMAGE3DPROC, glTexSubImage3D);
        NANE_OGL_LOADFUNCTION(PFNGLCOPYTEXSUBIMAGE3DPROC, glCopyTexSubImage3D);
        if( error == false && OGLAPI::version == GLAPI_1_1 )
        {
            OGLAPI::version = GLAPI_1_2;
        }
        
        error = false;
        NANE_OGL_LOADFUNCTION(PFNGLACTIVETEXTUREPROC, glActiveTexture);
        NANE_OGL_LOADFUNCTION(PFNGLCLIENTACTIVETEXTUREPROC, glClientActiveTexture);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4FPROC, glMultiTexCoord4f);
        NANE_OGL_LOADFUNCTION(PFNGLCOMPRESSEDTEXIMAGE2DPROC, glCompressedTexImage2D);
        NANE_OGL_LOADFUNCTION(PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2D);
        NANE_OGL_LOADFUNCTION(PFNGLSAMPLECOVERAGEPROC, glSampleCoverage);
        if( error == false && OGLAPI::version >= GLAPI_1_1_ES )
        {
            OGLAPI::version = GLAPI_ES_1_0;
        }
        
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1DPROC, glMultiTexCoord1d);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1DVPROC, glMultiTexCoord1dv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1FPROC, glMultiTexCoord1f);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1FVPROC, glMultiTexCoord1fv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1IPROC, glMultiTexCoord1i);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1IVPROC, glMultiTexCoord1iv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1SPROC, glMultiTexCoord1s);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD1SVPROC, glMultiTexCoord1sv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2DPROC, glMultiTexCoord2d);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2DVPROC, glMultiTexCoord2dv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2FPROC, glMultiTexCoord2f);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2FVPROC, glMultiTexCoord2fv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2IPROC, glMultiTexCoord2i);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2IVPROC, glMultiTexCoord2iv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2SPROC, glMultiTexCoord2s);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD2SVPROC, glMultiTexCoord2sv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3DPROC, glMultiTexCoord3d);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3DVPROC, glMultiTexCoord3dv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3FPROC, glMultiTexCoord3f);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3FVPROC, glMultiTexCoord3fv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3IPROC, glMultiTexCoord3i);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3IVPROC, glMultiTexCoord3iv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3SPROC, glMultiTexCoord3s);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD3SVPROC, glMultiTexCoord3sv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4DPROC, glMultiTexCoord4d);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4DVPROC, glMultiTexCoord4dv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4FVPROC, glMultiTexCoord4fv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4IPROC, glMultiTexCoord4i);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4IVPROC, glMultiTexCoord4iv);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4SPROC, glMultiTexCoord4s);
        NANE_OGL_LOADFUNCTION(PFNGLMULTITEXCOORD4SVPROC, glMultiTexCoord4sv);
        NANE_OGL_LOADFUNCTION(PFNGLLOADTRANSPOSEMATRIXFPROC, glLoadTransposeMatrixf);
        NANE_OGL_LOADFUNCTION(PFNGLLOADTRANSPOSEMATRIXDPROC, glLoadTransposeMatrixd);
        NANE_OGL_LOADFUNCTION(PFNGLMULTTRANSPOSEMATRIXFPROC, glMultTransposeMatrixf);
        NANE_OGL_LOADFUNCTION(PFNGLMULTTRANSPOSEMATRIXDPROC, glMultTransposeMatrixd);
        NANE_OGL_LOADFUNCTION(PFNGLCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3D);
        NANE_OGL_LOADFUNCTION(PFNGLCOMPRESSEDTEXIMAGE1DPROC, glCompressedTexImage1D);
        NANE_OGL_LOADFUNCTION(PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3D);
        NANE_OGL_LOADFUNCTION(PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC, glCompressedTexSubImage1D);
        NANE_OGL_LOADFUNCTION(PFNGLGETCOMPRESSEDTEXIMAGEPROC, glGetCompressedTexImage);
        if( error == false && OGLAPI::version >= GLAPI_1_2 )
        {
            OGLAPI::version = GLAPI_1_3;
        }

        error = false;
        NANE_OGL_LOADFUNCTION(PFNGLPOINTPARAMETERFPROC, glPointParameterf);
        NANE_OGL_LOADFUNCTION(PFNGLPOINTPARAMETERFVPROC, glPointParameterfv);
        if( error == false && OGLAPI::version >= GLAPI_ES_1_0 )
        {
            OGLAPI::version = GLAPI_1_4_ES;
        }
        
        error = false;
        NANE_OGL_LOADFUNCTION(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate);
        NANE_OGL_LOADFUNCTION(PFNGLFOGCOORDFPROC, glFogCoordf);
        NANE_OGL_LOADFUNCTION(PFNGLFOGCOORDFVPROC, glFogCoordfv);
        NANE_OGL_LOADFUNCTION(PFNGLFOGCOORDDPROC, glFogCoordd);
        NANE_OGL_LOADFUNCTION(PFNGLFOGCOORDDVPROC, glFogCoorddv);
        NANE_OGL_LOADFUNCTION(PFNGLFOGCOORDPOINTERPROC, glFogCoordPointer);
        NANE_OGL_LOADFUNCTION(PFNGLMULTIDRAWARRAYSPROC, glMultiDrawArrays);
        NANE_OGL_LOADFUNCTION(PFNGLMULTIDRAWELEMENTSPROC, glMultiDrawElements);
        NANE_OGL_LOADFUNCTION(PFNGLPOINTPARAMETERIPROC, glPointParameteri);
        NANE_OGL_LOADFUNCTION(PFNGLPOINTPARAMETERIVPROC, glPointParameteriv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3BPROC, glSecondaryColor3b);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3BVPROC, glSecondaryColor3bv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3DPROC, glSecondaryColor3d);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3DVPROC, glSecondaryColor3dv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3FPROC, glSecondaryColor3f);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3FVPROC, glSecondaryColor3fv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3IPROC, glSecondaryColor3i);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3IVPROC, glSecondaryColor3iv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3SPROC, glSecondaryColor3s);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3SVPROC, glSecondaryColor3sv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3UBPROC, glSecondaryColor3ub);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3UBVPROC, glSecondaryColor3ubv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3UIPROC, glSecondaryColor3ui);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3UIVPROC, glSecondaryColor3uiv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3USPROC, glSecondaryColor3us);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLOR3USVPROC, glSecondaryColor3usv);
        NANE_OGL_LOADFUNCTION(PFNGLSECONDARYCOLORPOINTERPROC, glSecondaryColorPointer);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2DPROC, glWindowPos2d);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2DVPROC, glWindowPos2dv);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2FPROC, glWindowPos2f);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2FVPROC, glWindowPos2fv);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2IPROC, glWindowPos2i);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2IVPROC, glWindowPos2iv);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2SPROC, glWindowPos2s);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS2SVPROC, glWindowPos2sv);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3DPROC, glWindowPos3d);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3DVPROC, glWindowPos3dv);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3FPROC, glWindowPos3f);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3FVPROC, glWindowPos3fv);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3IPROC, glWindowPos3i);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3IVPROC, glWindowPos3iv);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3SPROC, glWindowPos3s);
        NANE_OGL_LOADFUNCTION(PFNGLWINDOWPOS3SVPROC, glWindowPos3sv);
        if( error == false && OGLAPI::version == GLAPI_1_3 )
        {
            OGLAPI::version = GLAPI_1_4;
        }

        error = false;
        NANE_OGL_LOADFUNCTION(PFNGLBINDBUFFERPROC, glBindBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLDELETEBUFFERSPROC, glDeleteBuffers);
        NANE_OGL_LOADFUNCTION(PFNGLGENBUFFERSPROC, glGenBuffers);
        NANE_OGL_LOADFUNCTION(PFNGLISBUFFERPROC, glIsBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLBUFFERDATAPROC, glBufferData);
        NANE_OGL_LOADFUNCTION(PFNGLBUFFERSUBDATAPROC, glBufferSubData);
        NANE_OGL_LOADFUNCTION(PFNGLGETBUFFERPARAMETERIVPROC, glGetBufferParameteriv);
        if( error == false && OGLAPI::version >= GLAPI_1_4_ES )
        {
            OGLAPI::version = GLAPI_ES_1_1;
        }
        
        error = false;
        NANE_OGL_LOADFUNCTION(PFNGLGENQUERIESPROC, glGenQueries);
        NANE_OGL_LOADFUNCTION(PFNGLDELETEQUERIESPROC, glDeleteQueries);
        NANE_OGL_LOADFUNCTION(PFNGLISQUERYPROC,  glIsQuery);
        NANE_OGL_LOADFUNCTION(PFNGLBEGINQUERYPROC, glBeginQuery);
        NANE_OGL_LOADFUNCTION(PFNGLENDQUERYPROC, glEndQuery);
        NANE_OGL_LOADFUNCTION(PFNGLGETQUERYIVPROC, glGetQueryiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETQUERYOBJECTIVPROC, glGetQueryObjectiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETQUERYOBJECTUIVPROC, glGetQueryObjectuiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETBUFFERSUBDATAPROC, glGetBufferSubData);
        NANE_OGL_LOADFUNCTION(PFNGLMAPBUFFERPROC, glMapBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLUNMAPBUFFERPROC, glUnmapBuffer);
        NANE_OGL_LOADFUNCTION(PFNGLGETBUFFERPOINTERVPROC, glGetBufferPointerv);
        if( error == false && OGLAPI::version == GLAPI_1_4 )
        {
            OGLAPI::version = GLAPI_1_5;
        }
        
        NANE_OGL_LOADFUNCTION(PFNGLBLENDEQUATIONSEPARATEPROC, glBlendEquationSeparate);
        NANE_OGL_LOADFUNCTION(PFNGLDRAWBUFFERSPROC, glDrawBuffers);
        NANE_OGL_LOADFUNCTION(PFNGLSTENCILOPSEPARATEPROC, glStencilOpSeparate);
        NANE_OGL_LOADFUNCTION(PFNGLSTENCILFUNCSEPARATEPROC, glStencilFuncSeparate);
        NANE_OGL_LOADFUNCTION(PFNGLSTENCILMASKSEPARATEPROC, glStencilMaskSeparate);
        NANE_OGL_LOADFUNCTION(PFNGLATTACHSHADERPROC, glAttachShader);
        NANE_OGL_LOADFUNCTION(PFNGLBINDATTRIBLOCATIONPROC, glBindAttribLocation);
        NANE_OGL_LOADFUNCTION(PFNGLCOMPILESHADERPROC, glCompileShader);
        NANE_OGL_LOADFUNCTION(PFNGLCREATEPROGRAMPROC, glCreateProgram);
        NANE_OGL_LOADFUNCTION(PFNGLCREATESHADERPROC, glCreateShader);
        NANE_OGL_LOADFUNCTION(PFNGLDELETEPROGRAMPROC, glDeleteProgram);
        NANE_OGL_LOADFUNCTION(PFNGLDELETESHADERPROC, glDeleteShader);
        NANE_OGL_LOADFUNCTION(PFNGLDETACHSHADERPROC, glDetachShader);
        NANE_OGL_LOADFUNCTION(PFNGLDISABLEVERTEXATTRIBARRAYPROC, glDisableVertexAttribArray);
        NANE_OGL_LOADFUNCTION(PFNGLENABLEVERTEXATTRIBARRAYPROC, glEnableVertexAttribArray);
        NANE_OGL_LOADFUNCTION(PFNGLGETACTIVEATTRIBPROC, glGetActiveAttrib);
        NANE_OGL_LOADFUNCTION(PFNGLGETACTIVEUNIFORMPROC, glGetActiveUniform);
        NANE_OGL_LOADFUNCTION(PFNGLGETATTACHEDSHADERSPROC, glGetAttachedShaders);
        NANE_OGL_LOADFUNCTION(PFNGLGETATTRIBLOCATIONPROC, glGetAttribLocation);
        NANE_OGL_LOADFUNCTION(PFNGLGETPROGRAMIVPROC, glGetProgramiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETPROGRAMINFOLOGPROC, glGetProgramInfoLog);
        NANE_OGL_LOADFUNCTION(PFNGLGETSHADERIVPROC, glGetShaderiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETSHADERINFOLOGPROC, glGetShaderInfoLog);
        NANE_OGL_LOADFUNCTION(PFNGLGETSHADERSOURCEPROC, glGetShaderSource);
        NANE_OGL_LOADFUNCTION(PFNGLGETUNIFORMLOCATIONPROC, glGetUniformLocation);
        NANE_OGL_LOADFUNCTION(PFNGLGETUNIFORMFVPROC, glGetUniformfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETUNIFORMIVPROC, glGetUniformiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETVERTEXATTRIBDVPROC, glGetVertexAttribdv);
        NANE_OGL_LOADFUNCTION(PFNGLGETVERTEXATTRIBFVPROC, glGetVertexAttribfv);
        NANE_OGL_LOADFUNCTION(PFNGLGETVERTEXATTRIBIVPROC, glGetVertexAttribiv);
        NANE_OGL_LOADFUNCTION(PFNGLGETVERTEXATTRIBPOINTERVPROC, glGetVertexAttribPointerv);
        NANE_OGL_LOADFUNCTION(PFNGLISPROGRAMPROC, glIsProgram);
        NANE_OGL_LOADFUNCTION(PFNGLISSHADERPROC, glIsShader);
        NANE_OGL_LOADFUNCTION(PFNGLLINKPROGRAMPROC, glLinkProgram);
        NANE_OGL_LOADFUNCTION(PFNGLSHADERSOURCEPROC, glShaderSource);
        NANE_OGL_LOADFUNCTION(PFNGLUSEPROGRAMPROC, glUseProgram);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM1FPROC, glUniform1f);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM2FPROC, glUniform2f);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM3FPROC, glUniform3f);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM4FPROC, glUniform4f);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM1IPROC, glUniform1i);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM2IPROC, glUniform2i);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM3IPROC, glUniform3i);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM4IPROC, glUniform4i);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM1FVPROC, glUniform1fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM2FVPROC, glUniform2fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM3FVPROC, glUniform3fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM4FVPROC, glUniform4fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM1IVPROC, glUniform1iv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM2IVPROC, glUniform2iv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM3IVPROC, glUniform3iv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORM4IVPROC, glUniform4iv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX2FVPROC, glUniformMatrix2fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX3FVPROC, glUniformMatrix3fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX4FVPROC, glUniformMatrix4fv);
        NANE_OGL_LOADFUNCTION(PFNGLVALIDATEPROGRAMPROC, glValidateProgram);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB1DPROC, glVertexAttrib1d);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB1DVPROC, glVertexAttrib1dv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB1FPROC, glVertexAttrib1f);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB1FVPROC, glVertexAttrib1fv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB1SPROC, glVertexAttrib1s);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB1SVPROC, glVertexAttrib1sv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB2DPROC, glVertexAttrib2d);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB2DVPROC, glVertexAttrib2dv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB2FPROC, glVertexAttrib2f);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB2FVPROC, glVertexAttrib2fv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB2SPROC, glVertexAttrib2s);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB2SVPROC, glVertexAttrib2sv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB3DPROC, glVertexAttrib3d);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB3DVPROC, glVertexAttrib3dv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB3FPROC, glVertexAttrib3f);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB3FVPROC, glVertexAttrib3fv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB3SPROC, glVertexAttrib3s);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB3SVPROC, glVertexAttrib3sv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4NBVPROC, glVertexAttrib4Nbv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4NIVPROC, glVertexAttrib4Niv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4NSVPROC, glVertexAttrib4Nsv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4NUBPROC, glVertexAttrib4Nub);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4NUBVPROC, glVertexAttrib4Nubv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4NUIVPROC, glVertexAttrib4Nuiv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4NUSVPROC, glVertexAttrib4Nusv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4BVPROC, glVertexAttrib4bv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4DPROC, glVertexAttrib4d);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4DVPROC, glVertexAttrib4dv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4FPROC, glVertexAttrib4f);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4FVPROC, glVertexAttrib4fv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4IVPROC, glVertexAttrib4iv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4SPROC, glVertexAttrib4s);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4SVPROC, glVertexAttrib4sv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4UBVPROC, glVertexAttrib4ubv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4UIVPROC, glVertexAttrib4uiv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIB4USVPROC, glVertexAttrib4usv);
        NANE_OGL_LOADFUNCTION(PFNGLVERTEXATTRIBPOINTERPROC, glVertexAttribPointer);
        if( error == false )
        {
            OGLAPI::version = GLAPI_2_0;
        }
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX2X3FVPROC, glUniformMatrix2x3fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX3X2FVPROC, glUniformMatrix3x2fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX2X4FVPROC, glUniformMatrix2x4fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX4X2FVPROC, glUniformMatrix4x2fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX3X4FVPROC, glUniformMatrix3x4fv);
        NANE_OGL_LOADFUNCTION(PFNGLUNIFORMMATRIX4X3FVPROC, glUniformMatrix4x3fv);
        if( error == false )
        {
            OGLAPI::version = GLAPI_2_1;
        }

#undef NANE_OGL_LOADFUNCTION2
#undef NANE_OGL_LOADFUNCTION
        LOG_INFO("OpenGL API Loaded version %1") << cOGLAPIVersionToString[OGLAPI::version];
        return true;
    }
    ////////////////////////////////////////////////////////////////////////////////////////////////
    void ReleaseOpenGLAPI()
    {
        OGLAPI::version = GLAPI_UNKNOWN;
        DynamicModule::unloadModule(OGLAPI::hModule);
        OGLAPI::hModule = NULL;
    }
    ////////////////////////////////////////////////////////////////////////////////////////////////
}   // namespace nane
